/**
 * Created by wangshuyi on 2017/3/2.
 */

'use strict';

let ak = 'CrnXYIGDmnePEbwyUyUcGpuf';
let sk = 'GIVMsWZX7MT8u4enNZ9t4ISYwaQze68H';

let ocr = require('baidu-ocr-api').create(ak,sk);
// 外部图片
ocr.scan({
    url:'./WechatIMG21.jpeg', // 支持本地路径
    type:'text',
}).then(function (result) {
    return console.log(result)
}).catch(function (err) {
    console.log('err', err);
});